-- Readme - How To Use
-- Author: HandyVac
-- DateCreated: 5/1/2015 11:33:37 PM
--------------------------------------------------------------
This resource adds two new tables which allow Unit Perks and Unit Upgrades to grant Promotions to the unit recieving them.

To use this in your mod:

1)	Copy the files "PerksGrantPromotions.lua", "PGP_Create_New_Tables.xml" and "UnitUpgradePopup.lua" from this folder and include them in your Modbuddy project.

2)	In the properties window of your Modbuddy project, under the Actions tab, add: OnModActivated -> UpdateDatabase -> PGP_Create_New_Tables.xml
	(Note: the order of files is important in the OnModActivated list. Make sure PGP_Create_New_Tables.xml comes at the top of the list, *before* any other xml files that use the new tables)

3)	In the properties window of your Modbuddy project, under the Content tab, add: InGameUIAddin -> PerksGrantPromotions.lua
	(Note: fill in what you like for Name and Description here, or leave them blank, it makes no difference.)

4)	In the properties window for the file UnitUpgradePopup.lua, set Import into VFS = true
	(Note: Including this file is optional. Without it the tooltips in the Unit Upgrade screen will not display promotions, but units will still be granted them.)

You may now use the tables <UnitPerks_Promotions> and <UnitUpgrades_Promotions> in your mod to add a promotion to any UnitPerk or UnitUpgrade:

<UnitPerks_Promotions>
	<Row>
		<UnitPerkType></UnitPerkType> <!-- the perk you want to grant a promotion -->
		<PromotionType></PromotionType> <!-- the promotion you want it to grant -->
	</Row>
</UnitPerks_Promotions>

<UnitUpgrades_Promotions>
	<Row>
		<UpgradeType></UpgradeType>	<!-- the upgrade you want to grant a promotion -->
		<PromotionType></PromotionType>	<!-- the promotion you want it to grant -->
	</Row>
</UnitUpgrades_Promotions>

See "Example_How_To_Use.xml" for a working example.



Known Issues
--------------------------------------------
- Perks gained as a FreePerk during a unit upgrade will not trigger the promotion-granting system (but perks the player can choose between during an upgrade will). Use the UnitUpgrades_Promotions table instead if you want a unit to automatically gain a promotion when levelling up.